package file;

import java.io.File;

public class Demo1 {
    public static void main(String[] args) {
        //文件创建的三种方式
        String str = "D:\\software\\jack.txt";
        File  file1 = new File(str);
        System.out.println(file1);
        //2.
        String parent = "D:\\software";
        String child = "a.txt";
        File file2 = new File(parent,child);
        System.out.println(file2);
        //3.
        String parentFile = "D:\\software";
        String childFile = "jack\\a.txt";
        File file3 = new File(parentFile,childFile);
        System.out.println(file3);

    }
}
